<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
	<link rel="shortcut icon" href="http://localhost:8080${pageContext.request.contextPath}/img/logo.jpg">
    <title>我的</title>
	<!-- Bootstrap -->
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
	<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
	<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
	<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
	<style type="text/css">
		/* 选择器：1.标签 2.class 3.id */
		.lbimg{
			width: 100%;
		}
		.dvfooter{
			position: absolute;
			bottom: 2px;
			height: 40px;
			background-color: #0062CC;
			width: 100%;
		}
		.headimg{
			width: 50px;
			height: 50px;
			border-radius: 50%;
		}
		.list-group-item{
			padding: 15px;
		}
	</style>
  </head>
  <body style="background-color: #86CFDA;">
    <div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<nav class="navbar navbar-default" role="navigation">
					<div class="navbar-header">
						 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
							 <span class="sr-only">Toggle navigation</span>
							 <span class="icon-bar"></span>
							 <span class="icon-bar"></span>
							 <span class="icon-bar"></span>
						 </button>
						<img src="http://localhost:8080${pageContext.request.contextPath}/img/label.jpg" class="navbar-brand" style="">
					</div>
	
					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
						<ul class="nav navbar-nav navbar-right">
							<li>
								<a href="${pageContext.request.contextPath}/index.jsp">首页</a>
							</li>
							<li>
								<c:if test="${sessionScope.user!=null}">
									<a href="${pageContext.request.contextPath}/api/task/show.do">任务</a>
								</c:if>
								<c:if test="${sessionScope.user==null}">
									<a href="${pageContext.request.contextPath}/safety/usertasklist.jsp">任务</a>
								</c:if>
							</li>
							<li class="dropdown">
								<a href="${pageContext.request.contextPath}/api/question/showAll.do">题库</a>
							</li>
							<li class="active">
								<a href="#">我的</a>
							</li>
						</ul>
					</div>
				</nav>
				<div class="carousel slide" id="carousel-712885">
					<ol class="carousel-indicators">
						<li class="active" data-slide-to="0" data-target="#carousel-712885">
						</li>
						<li data-slide-to="1" data-target="#carousel-712885">
						</li>
						<li data-slide-to="2" data-target="#carousel-712885">
						</li>
					</ol>
				</div>
			</div>
		</div>
	
		<div class="row" style="margin-top: 50px;">
			<div class="col-lg-6" >
				<div class="row" style="text-align: center;">
					<div class="col-xs-12" style="height: 50px;">
						<img class="headimg" src="https://img2.baidu.com/it/u=3937533670,1686544070&fm=26&fmt=auto&gp=0.jpg" />
						<label style="margin-left: 10px;">
						<c:if test="${sessionScope.user==null}"><a href="${pageContext.request.contextPath}/login.jsp">登陆</a></c:if>
						<c:if test="${sessionScope.user!=null}">${sessionScope.user.nickname}</c:if>
						</label>
					</div>
				</div>
				<div class="row" style="margin-top: 20px;">
					<div class="col-md-12 column">
						<div class="list-group">
							<div class="list-group-item">
								<a href="${pageContext.request.contextPath}/api/task/show.do">我的任务</a>
							</div>
							<div class="list-group-item">
								<c:if test="${sessionScope.user!=null}">
									<a href="${pageContext.request.contextPath}/safety/usertaskadd.jsp">添加任务</a>
								</c:if>
								<c:if test="${sessionScope.user==null}">
									<a href="${pageContext.request.contextPath}/login.jsp">添加任务</a>
								</c:if>
							</div>
							<div class="list-group-item">
								<a href="${pageContext.request.contextPath}/api/question/showAll.do?uid=${sessionScope.user.id}">我的试题</a>
							</div>
							<div class="list-group-item">
								<c:if test="${sessionScope.user!=null}">
									<a href="${pageContext.request.contextPath}/safety/questionadd.jsp">我要出题</a>
								</c:if>
								<c:if test="${sessionScope.user==null}">
									<a href="${pageContext.request.contextPath}/login.jsp">我要出题</a>
								</c:if>
							</div>
							<div class="list-group-item">
								<a href="${pageContext.request.contextPath}">我的分数</a>
							</div>
							<div class="list-group-item">
								<a href="${pageContext.request.contextPath}">意见反馈</a>
							</div>
							 <a href="${pageContext.request.contextPath}/api/user/logout.do" class="list-group-item active" style="text-align: center;">退出账号</a>
						</div>
					</div>
				</div>
			</div>
			<div class="col-lg-6">
				<div class="jumbotron" style="background-color: #86CFDA;">
					<h2>
						今日任务
					</h2>
					<p>
						This is a template for a simple marketing.
					</p>
					<p>
						This is a template for a simple marketing.
					</p>
					<p>
						This is a template for a simple marketing or informational website.
					</p>
					<p>
						This is a template for a simple marketing or informational website.
					</p>
					<p>
						<a class="btn btn-primary btn-large" href="${pageContext.request.contextPath}/api/task/show.do?day=today">完成今日测试</a>
					</p>
				</div>
			</div>
		</div>
    </div>
  </body>
</html>